/* 
 *   Classname:  sdk.org.SpringBoot.spring_boot_starter_security.D01.config.JavaConfig
 * 
 *   Date       Developer   Description
 *   2018年3月14日    周成功              新建
 *
 */
package SpringBoot.spring_boot_starter_websocket.D01_获取服务器时间.config;

import java.io.IOException;

import org.springframework.boot.autoconfigure.websocket.TomcatWebSocketContainerCustomizer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 *
 * @author 周成功
 *
 */
@Configuration
public class JavaConfig {
    @Bean
    public EmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory() throws IOException {
        TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
        return tomcat;
    }
    
    @Bean
    public TomcatWebSocketContainerCustomizer websocketContainerCustomizer() {
        return new TomcatWebSocketContainerCustomizer();
    }
}
